package com.wyh.service;


import com.wyh.common.response.PageInfo;
import com.wyh.common.result.R;
import com.wyh.entity.AdminUser;
import com.wyh.request.AdminUserRequest;
import com.wyh.request.PasswordLoginRequest;
import com.wyh.request.VerifyCodeLoginRequest;
import com.wyh.vo.LoginVo;

import java.util.List;

/**
 * 用户管理接口
 *
 * @author WangYuHang
 * @date 2024-03-03
 */
public interface IAdminUserService {


    /**
     * 用户密码登录
     * @param loginRequest
     * @return
     */
    R<LoginVo> passwordLogin(PasswordLoginRequest loginRequest);

    /**
     * 用户验证码登录
     * @return
     */
    R<LoginVo> verifyCodeLogin(VerifyCodeLoginRequest verifyCodeLoginRequest);


    /**
     * 根据id查询用户
     *
     * @param userId
     * @return AdminUser
     */
    AdminUser getById(String userId);


    /**
     * 注册用户
     *
     * @param param param
     * @return AdminUser
     */
    R<Void> add(AdminUserRequest param);

    /**
     * 删除
     *
     * @param id id
     * @return boolean
     */
    boolean delete(Integer id);

    /**
     * 批量删除
     *
     * @param ids ids
     * @return boolean
     */
    boolean deleteBatch(List<Integer> ids);

    /**
     * 更新
     *
     * @param param param
     * @return boolean
     */
    boolean update(AdminUserRequest param);


    /**
     * 查询分页数据
     *
     * @param param param
     * @return PageInfo<AdminUser>
     */
    PageInfo<AdminUser> pageList(AdminUserRequest param);


    /**
     * 查询所有数据
     *
     * @return List<AdminUser>
     */
    List<AdminUser> list(AdminUserRequest param);
}
